package com.client.widgets;

import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.DockPanel;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HasHorizontalAlignment;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.SimplePanel;
import com.google.gwt.user.client.ui.VerticalPanel;


public class RootWidget extends Composite {
	//the main encapsulating panel
	private VerticalPanel verticalPanel;
	private HorizontalPanel header;
	private SimplePanel contentPanel;
	private LoginWidget loginWidget;
	private DockPanel dockPanel;
	private HTML htmlLogo;
	private HTML htmlAboutUs;
//	private HTML htmlBottom;
	
	
	public RootWidget() {
		this.verticalPanel = new VerticalPanel();
		this.header = new HorizontalPanel();
		this.contentPanel = new SimplePanel();
		//widget inits
		this.loginWidget = new LoginWidget(this);
		this.dockPanel = new DockPanel();
		
		this.htmlLogo = new HTML("<center> <BR> <B> Abridge Technology<BR><BR><img src='http://i19.photobucket.com/albums/b172/pabloprieto/1231960907575.gif' border='0' > <BR><BR> testing, testing... </center>", true);
		this.htmlAboutUs = new HTML("<center> <BR> <B> About Us<BR><BR>   <div style='width: 450px; height: 200px; border-style: Pick One; font-size: 20px; overflow: auto;'>asdfasdfa fadsf adsf ds ads adsfasdfa asdfasdf adsf adsf adsf adsf adsdaslfk aldskfj aldskjf alsdkf jalksdjf laksdj flkasjd lfkasjdl fkajsdlfkajsdf <BR><BR> alskdjflaksdj lfkajsdl kfajsldkfja lkdsf as <BR> akjsdhfkajshdf kjahsd fjs  <BR> aksjdhfkajshd kfjahsdkjfhaskdjfhk asjdhfkjasdhfkahsd fa kdjfh akjfd akjdsff afdfds aasdf <BR>asdfasdfasdfasdfasdf asdf asdf adsf adsf adsf ads afd</div></center>", true);
	//	this.htmlBottom = new HTML("aqui puede ir el disclaimer o w/e john john john lol wut",true);
		this.header.add(this.loginWidget);
		
	
		
		
		this.dockPanel.add(this.htmlLogo, DockPanel.NORTH);
		this.dockPanel.add(this.contentPanel, DockPanel.WEST);
		this.dockPanel.add(this.header, DockPanel.WEST);	
		this.dockPanel.add(this.htmlAboutUs, DockPanel.EAST);
		


	
		this.dockPanel.setBorderWidth(5);
		
		this.dockPanel.setCellHorizontalAlignment(this.header, HasHorizontalAlignment.ALIGN_CENTER);
		this.dockPanel.setCellHorizontalAlignment(this.contentPanel, HasHorizontalAlignment.ALIGN_CENTER);
		
		this.dockPanel.setStylePrimaryName("dockPanel");
		
		this.dockPanel.setWidth("100%");
		
		initWidget(dockPanel);
	}

	public VerticalPanel getVerticalPanel() {
		return verticalPanel;
	}

	public void setVerticalPanel(VerticalPanel verticalPanel) {
		this.verticalPanel = verticalPanel;
	}

	public HorizontalPanel getHeader() {
		return header;
	}

	public void setHeader(HorizontalPanel header) {
		this.header = header;
	}

	public SimplePanel getContentPanel() {
		return contentPanel;
	}

	public void setContentPanel(SimplePanel contentPanel) {
		this.contentPanel = contentPanel;
	}


	public LoginWidget getLoginWidget() {
		return loginWidget;
	}

	public void setLoginWidget(LoginWidget loginWidget) {
		this.loginWidget = loginWidget;
	}

	
	public DockPanel getDockPanel(){
		return dockPanel;
	}
	public void setDockPanel(DockPanel dockPanel) {
		this.dockPanel = dockPanel;
	}
}
